Canvas 

Inherits from: 
Window Item  

_____________________________________________________
                name   *185*

Type:  string 

Description:
Used by the primitive find-item to find a «Canvas» by name. 

_____________________________________________________
                owner   *185*

Type:  Window 

Constraints:
Not settable.

Description:  If «Canvas» is a member of item list of an active «Window», then the value of this attribute is that «Window». Otherwise the value of owner is NULL.

_____________________________________________________
                active?   *185*

Type:  boolean

Constraints: 
Not settable on default. 

Description: 
«Canvas» responds to clicks only if the value of this attribute is TRUE.

Side effects:  Setting causes «Canvas» to be redrawn. When the value of this attribute is set to FALSE, the vertical and horizontal scroll bars of «Canvas» are deactivated.

_____________________________________________________
                 visible?   *185*

Type:  boolean

Description:  «Canvas» is displayed in the owning «Window» if and only if the value of this attribute is TRUE.

Side effects:
Setting causes «Canvas» to be redrawn. 

_____________________________________________________
                 move?   *186*

Type:  boolean

Description: 
The location of «Canvas» is changed relative to the size of the owning «Window» if and only if the value of this attribute is TRUE.

_____________________________________________________
                 grow?   *186*

Type:  boolean

Description: 
The size of «Canvas» is changed relative to the size of the owning «Window» if and only if the value of this attribute is TRUE.

_____________________________________________________
                 location   *186*

Type:  Point

Description:
Location of upper left corner of «Canvas» in owning «Window».

Side effects:
Setting causes «Canvas» to be redrawn.

_____________________________________________________
                 size   *186*

Type:  Point

Description:
Offset of lower right corner of «Canvas» from upper left corner.

Side effects:
Setting causes «Canvas» to be redrawn.

_____________________________________________________
                 balloon   *186*

Type: 
list 

Description:
Balloon Help information; format varies with the type (Prograph string or 'STR ', 'STR#', 'TEXT' or 'PICT' resource) of Balloon Help.

_____________________________________________________
                 border?   *187*

Type: 
boolean 

Description:
A 1-point border is drawn around the «Canvas» if the value of this attribute is TRUE.

Side effects:
 Setting causes «Canvas» to be redrawn. 

________________________________________
                vControl   *187*

Type:  ControlRecord@@

Constraints:
Not settable.

Description:
Control record of the vertical scroll bar of «Canvas».

_____________________________________________________
                hControl   *187*

Type:  ControlRecord@@

Constraints:
Not settable.

Description:
Control record of the horizontal scroll bar of «Canvas».

_____________________________________________________
                vScroll?   *187*

Type:  boolean 

Constraints:
Not settable when owning «Window» is active. 

Description: 
The item has a vertical scroll bar if and only if the value of this attribute is TRUE.

_____________________________________________________
                hScroll?   *187*

Type:  boolean 

Constraints:
Not settable when owning «Window» is active. 

Description: 
The item has a horizontal scroll bar if and only if the value of this attribute is TRUE.

_____________________________________________________
                origin   *188*

Type:  Point

Description:
The position on the drawing plane of the top left corner of the «Canvas» rectangle. The size of «Canvas» is defined by the value of its size attribute. The Canvas view is a view onto the drawing plane; the drawing plane can be much larger than this view. The size of the Canvas view depends on whether it has scroll bars or not. If it does, the Canvas view rectangle is the Canvas rectangle minus 15 pixels for the bottom coordinate if it has a horizontal scroll bar and minus 15 pixels for the right coordinate if it has a vertical scroll bar. The drawing plane defines the area into which one can draw; its bounding rectangle is specified by the value of the limits attribute. The drawing plane thus establishes the range over which the canvas view can be scrolled, and constrains the possible values of origin.

Side effects:  Setting causes the Canvas view to be moved on the drawing plane and the scroll bars to be adjusted accordingly. 

_____________________________________________________
                 limits   *188*

Type: 
Rect

Description:
The rectangle defining the size and coordinate system of the drawing plane (to which graphics instructions can be directed), and the area over which the Canvas view can range. The minimum and maximum values for each coordinate are -32K and +32K. If the limits rectangle is equal to or smaller than the Canvas view, and the origin is equal to the top-left corner of limits, then the scroll bars (if any) are inactive.

Side effects:  Setting causes «Canvas» to be redrawn and the scroll bars to be adjusted appropriately.

_____________________________________________________
                click method   *189*

Type:  string

Description: 
«Canvas» responds to clicks only if the value of this attribute is a nonempty string.

Method inputs:
<owning «Window»>, «Canvas», <Point of click>, <EventRecord of click>

_____________________________________________________
                draw method  *189*

Type:  string

Description: Name of the method called to redraw «Canvas». If this method is called by the Application Manager in response to a redraw event, it is automatically framed between calls to sc-begin-drawing and sc-end-drawing. See Chapter 7, “The Macintosh Toolbox”, for more details.

Method inputs: 
<owning «Window»>, «Canvas», <EventRecord>